{-# OPTIONS -fglasgow-exts #-}

module Data.Transform.Convert where

import Data.Transform.TwoLevel
import qualified Data.Transform.Rule as PF

evalRule :: PF.Rule -> Rule
evalRule r t = do
  (PF.View (PF.Rep to fr) t') <- r t
  return (View (Rep (PF.eval to) (PF.eval fr)) t')
   